<?php
return array(
    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'Wap Content',
    'language'=>'vi',
    
    'preload'=>array('log'),
    
    'import'=>array(
        'application.models.*',        
        'application.components.*',
        'application.extensions.*', 
        'application.extensions.url.*',                 
        'application.utilities.*', 
        'zii.widgets.CPortlet',
    ),
    
    'modules' => array(
      'wcp',
    ),
    'components'=>array(
        'user'=>array(            
            'allowAutoLogin'=>true,
        ),
        
        'CURL' =>array(
            'class' => 'application.extensions.curl.Curl'
        ),                

        'db'=>array(
            'connectionString' => 'mysql:host=localhost;dbname=hdc_wap_content',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => 'uiouio',
            'charset' => 'utf8',
            'class'=>'CDbConnection'            
        ),
     
        'errorHandler'=>array(            
            'errorAction'=>'home/error',
        ),
        'urlManager'=>array(
            'urlFormat'=>'path',
            'showScriptName'=>false,            
            'caseSensitive' => true,
            'rules'=>array(                                
                
                '/<page:\d+>'=>'home/index',
                '/'=>'home/index',
                
                '/mobile-game-online/<alias>-<game_id:\d+>'=>'game/gameOnlineDetail',
                '/video/<alias>-v<video_id:\d+>'=>'video/detail',
                '/album/<alias>-a<album_id:\d+>'=>'album/detail',
                
                '/phieu-xac-nhan-thanh-toan-<id:\d+>'=>'user/detailPayment',
                '/xac-nhan-thanh-toan/buoc-1'=>'user/confirmPaymentStepOne',
                '/xac-nhan-thanh-toan-<type:\d+>/buoc-2'=>'user/confirmPaymentStepTwo',
                
                '/doi-soat-sms'=>'gatewayReport/sms',
                '/doi-soat-card-smobi'=>'gatewayReport/cardSmobi',
                '/doi-soat-card'=>'gatewayReport/card',
                
                '/gioi-thieu'=>'general/intro',
                '/cac-cau-hoi-thuong-gap'=>'general/qa',
                '/quy-dinh-su-dung'=>'general/privacy',
                '/chinh-sach-hop-tac'=>'general/paymentRule',
                
                '/tai-ngay-bo-anh-hot-<id>-<dataId>'=>'albumDetail/index',
                '/<username>/tai-game-online-<alias>-<id:\d+>'=>'download/gameOnline',
                '/<username>/<alias>-<id:\d+>'=>'download/app',
                '/tai-ngay-<alias>-<id:\d+>'=>'download/downloadMyAdv',                
                '/tai-ngay-video-<id>-<dataId>'=>'download/video',
                '/tai-ngay-anh-hot-<id>-<dataId>'=>'download/image',
                '/tai-ngay-game-<id>-<dataId>-<userId>'=>'download/game',
                '/tai-game-offline-<alias>-<id:\d+>'=>'download/gameOffline',
                '/cap-nhat-game'=>'download/downloadUpdate',
                '/<alias>-<id:\d+>u<userId:\d+>'=>'download/downloadGame',
                '/ca-nhan-c<catId:\d+>'=>'user/index', 
                '/ca-nhan'=>'user/index',
                '/ca-nhan/<alias>-t<typeCat:\d+>d<id:\d+>'=>'user/dataDetail',
                '/ca-nhan/danh-muc-c<catId:\d+>'=>'user/dataCat',
                '/ca-nhan/danh-muc-c<catId:\d+>/<page:\d+>'=>'user/dataCat',
                '/chon-viec'=>'user/work',
                '/ung-dung-ban-le'=>'user/application',
                
                '/<alias>-app<id:\d+>/<page:\d+>'=>'user/applicationDetail',
                '/<alias>-app<id:\d+>'=>'user/applicationDetail',
                
                '/tao-box-quang-cao'=>'user/addMyAdv',
                
                '/<alias>-adv<id:\d+>/<page:\d+>'=>'user/myAdvDetail',
                '/<alias>-adv<id:\d+>'=>'user/myAdvDetail',
                
                '/xoa-quang-cao'=>'user/deleteMyAdv',
                '/nhung-box-quang-cao'=>'user/boxAdv',
                
                '/thong-bao-cap-nhat-mat-khau'=>'message/activeForgotPassword',
                '/thong-bao-doi-mat-khau'=>'message/changePassword',
                '/thong-bao-quen-mat-khau'=>'message/forgotPassword',
                '/thong-bao-dang-ky-tai-khoan'=>'message/register',
                '/thong-bao-xac-nhan-thanh-toan'=>'message/confirmPaymentError',
                
                '/sua-thong-tin-ca-nhan'=>'login/editProfile',
                '/thong-tin-ca-nhan'=>'login/profile',
                '/lay-lai-mat-khau'=>'login/activeForgotPassword',
                '/quen-mat-khau'=>'login/forgotPassword',
                '/doi-mat-khau'=>'login/changePassword',
                
                '/kich-hoat-tai-khoan'=>'login/active',
                '/dang-nhap'=>'login/index',
                '/dang-ky'=>'login/register',
                                                    
                'wcp/<controller:\w+>/<action:\w+>'=>'wcp/<controller>/<action>',
                '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
                
            ),
        ),
        'cache' => array (
            'class'=>'system.caching.CFileCache',
            /*
            'class' => 'CMemCache',
               'servers'=>array(
            array(
                   'host'=>'localhost',
                'port'=>11211,
                'weight'=>60,
                ),
            ),
            */
        ),
        'log'=>array(
            'class'=>'CLogRouter',
            'routes'=>array(
                array(
                    'class'=>'CFileLogRoute',
                    'levels'=>'error, warning',
                ),
            ),
        ),
    ),
    
    'params'=>require(dirname(__FILE__).'/con_params.php'),
);
